package org.yangspring.samples.mvc.serviceOracle;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.yangspring.samples.mvc.daoOracle.SalgradeDAO;
import org.yangspring.samples.mvc.domainOracle.Salgrade;

import java.util.List;

import static java.lang.System.out;

/**
 * Created by whyang on 2017/06/22.
 */

@Service
public class SalgradeServiceImpl implements SalgradeService {

    private static final Logger logger = LoggerFactory.getLogger(SalgradeServiceImpl.class);

    @Autowired
    private SalgradeDAO salDao;

//    public void setSalDao(SalgradeDAO salDao){
//        this.salDao = salDao;
//    }

    @Transactional
    public List<Salgrade> listSal(){

        logger.warn("\nOracle SalgradeServiceImpl\n");

        return this.salDao.listSal();
    }
}
